import Vue from 'vue'
import VueRouter from 'vue-router'
import Classify from '../views/Classify.vue'
import Front from '../views/Front.vue'
import My from '../views/My.vue'
import Order from '../views/Order.vue'
import Sports from '../views/Sports.vue'
import guoN from '../views/sport/guoN.vue'
import guoW from '../views/sport/guoW.vue'
import MySport from '../views/sport/MySport.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/front'
  },
  {
    path: '/front',
    component: Front
  },
  {
    path: '/order',
    component: Order
  },
  {
    path: '/classify',
    component: Classify
  },
  {
    path: '/my',
    component: My
  },
  {
    path: '/sports',
    component: Sports,
    children: [
      {
        path: 'guon',
        component: guoN,
      },
      {
        path: 'guow',
        component: guoW,
      },
      {
        path: 'mysport',
        component: MySport,
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
